package webcontext;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import im.notify.server.MinaServer;

	
public class WebContextListener implements ServletContextListener{

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		// 全局退出方法
		
		MinaServer.share().unbind();
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		// 全局初始化方法
		System.out.println("start!!");
		
		MinaServer.share().init();
	}
	
	

}
